package com.yupi.yupicturebackend.service;

import cn.hutool.http.HttpRequest;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yupi.yupicturebackend.model.entity.User;
import com.yupi.yupicturebackend.model.vo.UserVO;

import javax.servlet.http.HttpServletRequest;


/**
* @author Administrator
* @description 针对表【user(用户)】的数据库操作Service
* @createDate 2025-04-14 16:16:43
*/
public interface UserService extends IService<User> {
    /**
     * 用户注册
     * @param userAccount 账号
     * @param userPassword 密码
     * @param checkPassword 确认密码
     * @return
     */
    Long userRegister(String userAccount, String userPassword, String checkPassword);

    /**
     * user login
     * @param userAccount account
     * @param userPassword password
     * @param httpRequest cookie
     * @return
     */
    UserVO userLogin(String userAccount, String userPassword, HttpServletRequest httpRequest);

    /**
     * select user
     * @param httpRequset session
     * @return
     */
    UserVO getUser(HttpServletRequest httpRequset);

    /**
     * is admin
     * @param user
     * @return
     */
    boolean isADMIN(User user);
}
